package com.xinzhi.controller;

import com.xinzhi.pojo.dto.JiaFenShenHe;
import com.xinzhi.service.AppraisalService;
import com.xinzhi.service.AppraisalssService;
import com.xinzhi.service.BonusreviewServicee;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class JiaFenShenHeController {

    @Autowired
    private AppraisalssService appraisalssService;
    @Autowired
    private BonusreviewServicee bonusreviewServicee;

    /**
     * 特殊加分审核查询接口
     * @return
     */
    @GetMapping("/selectJia")
    public List<JiaFenShenHe> selectJia(){
        return appraisalssService.selectAllsss();
    }

    /**
     * 特殊加分审核根据状态擦查询接口
     * @param publishstatus
     * @return
     */
    @GetMapping("/selectpublish")
    public Result selectpublish(String publishstatus){
        Result publish = appraisalssService.selectpublish(publishstatus);
        return publish;
    }


    /**
     * 特殊加分审核根据年份查询接口
     * @param yearnumber
     * @return
     */
    @GetMapping("/selectBonusreview")
    Result selectBonusreview(Integer yearnumber){
        Result result = bonusreviewServicee.selectBonusreview(yearnumber);
        return result;
    }


    /**
     * 特殊加分审核删除接口
     * @param poinexe
     * @param deleted
     * @return
     */
    @PostMapping("/updateBypoinexe")
    public Result updateBypoinexe(String poinexe,Integer deleted){
        return appraisalssService.deleteupdate(poinexe,deleted);
    }




}
